<script src="/login/status"></script>
<script>
    if(!isLogin) location.href = "/admin/login.html"
</script>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理后台首页</title>
    <link rel="stylesheet" href="../assets/vendors/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../assets/css/common.css">
    <link rel="stylesheet" href="../assets/css/admin.css">
    <link rel="stylesheet" href="../assets/vendors/aliFont/iconfont.css">
    <link rel="stylesheet" href="../assets/vendors/nprogress/nprogress.css">
    <script src="../assets/vendors/nprogress/nprogress.js"></script>
    <script src="../assets/vendors/Jquery/jquery-1.11.0.min.js"></script>
</head>
<body>
    <script>NProgress.start()</script>
    <div class="indexBox clearfix">
        <div class="slide">
            <div class="slide-head">
                <div class="avatar">
                    <img src="../uploads/avatar.jpg" alt="">
                </div>
                <span class="user">Coder</span>
            </div>
            <div class="nav">
                <ul class="navItems">
                    <li class="navActive">
                        <a href="./index.html">
                             <span class=" iconfont icon-yibiaopan"></span>仪表盘
                        </a>
                    </li>
                    <li>
                            <a href="javascript:;"><span class=" iconfont icon-wenzhang"></span>文章<span class=" iconfont icon-arrow-right arrow"></span></a>
                       
                        <ul class="itemgroup">
                            <li><a href="articleAll.html">所有文章</a></li>
                            <li><a href="addArticle.html">写文章</a></li>
                            <li><a href="cateArticle.html">分类目录</a></li>
                        </ul>
                    </li>
                    <li><a href="./comments.html"><span class=" iconfont icon-chat"></span>评论</a></li>
                    <li><a href="./user.html"><span class=" iconfont icon-yonghu"></span>用户</a></li>
                    <li>
                        
                           <a> <span class=" iconfont icon-shezhi"></span>设置<span class="iconfont icon-arrow-right arrow"></span></a>
                        <ul class="itemgroup" >
                            <li><a href="slides.html">图片轮播</a></li>
                            <li><a href="settings.html">网站设置</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
        <div class="main">
            <div class="content-head">
                <div class="content-icon">
                    <div class="content-left">
                        <span class="iconfont icon-shouqianniuicon"></span>
                    </div>
                </div>
                <div class="modify">
                    <a href="passwordReset.html">
                      <span class="iconfont icon-yonghu1"></span>修改密码
                    </a>
                </div>
                <div class="loginOut">
                    <span class="iconfont icon-tuichu_huaban1"></span><span>退出</span>
                </div>
            </div>
            <div class="content">
              <p>图片轮播</p> 
              <div class="row">
                  <div class="col-md-4">
                      <span class="content_title">添加新轮播内容</span>
                      <form action="" class="slidesForm">
                          <div class="formgroup">
                              <label for="">图片</label>
                              <input type="file" class="fileInput">
                              <input type="hidden" name="image" id="slidesHideen">
                          </div>
                          <div class="formgroup">
                            <label for="">文本</label>
                            <input type="text" placeholder="文本" name="title">
                        </div>
                        <div class="formgroup">
                            <label for="">链接</label>
                            <input type="text" placeholder="链接" name="link">
                        </div>
                        <button type="submit" class="btn btn-primary btn-sm cateBtn">添加</button>
                      </form>
                  </div>
                  <div class="col-md-8">
                    <table class="table table-striped table-bordered table-hover  cateTable slideTable">
                       <thead>
                           <tr>
                            <th width="50%">图片</th>
                            <th width="30%">文本</th>
                            <th width="10%">链接</th>
                            <th width="10%">操作</th>
                           </tr>
                       </thead>
                       <tbody>
                          
                       </tbody>
                      </table>
                  </div>
              </div> 
        </div>
    </div>
    <script>NProgress.done()</script>
    <script src="../assets/js/common.js"></script>
    <script src="../assets/vendors/art-template/template-web.js"></script>
    <script type='text/html' id="slideFormTpl">
     {{each data}}
     <tr>
        <td><img src="{{$value.image}}" alt=""></td>
       
        <td>{{$value.title}}</td>
        <td>{{$value.link}}</td>
        <td>
            <button type="button" class="btn btn-danger btn-xs deleteSlide" data-id="{{$value._id}}">删除</button>
        </td>
     </tr>
     {{/each}}
    </script>
    <script src="../assets/js/slides.js"></script>
</body>
</html>